<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>xss</title>
    <style>
            #msg {
              margin: 0;
              padding: 0;
              list-style: none;
            }
     </style>
</head>
<body>
        <ul id="msg">
            <li>消息：</li>
        </ul>
            
      <input type="text" id="send">
            
      <script>
        send.onkeydown = e => {
            if (e.ctrlKey && e.keyCode === 13) {
            const html = `<li>${e.target.value}</li>`
            msg.innerHTML += html
            e.target.value = ''
            }
        }
       </script>
</body>
</html>